A processor manipulates and controls the flow of data in a computer system. Increasing the speed or throughput of the processor will tend to increase the computational power of the computer. Processor designers employ many different techniques to increase processor speed and throughput to create more powerful computers for consumers. One technique used by designers is called predication.
Predication is the conditional execution of instructions depending on the value of a predicate. For example, consider the following sequence of instructions:COMPARE R1=R2→p2(p2) ADD R3+R4→R5The first instruction, COMPARE R1=R2→p2, determines a value for the predicate p2 based on a comparison of the operands R1 and R2. If the value of register R1 is equal to the value of register R2, then the value of predicate p2 is set to “True”, and if the values of R1 and R2 are not equal, then p2 is set to “False.” “True” and “False” are typically represented in the processor as single bit values “1” and “0”, respectively, (or “0” and “1”, respectively, in a negative logic implementation).
The second instruction, (p2) ADD R3+R4→R5, includes two parts. The first part, (p2), predicates (or conditions) the second part, ADD R3+R4→R5, on the value of predicate p2. If P is true (e.g. a “1”), then the value of R5 is set equal to the value of R3+R4. If p2 is false (e.g. a “0”), then the second part of the instruction is skipped (essentially treating the instruction like a no-op) and the processor executes the next sequential instruction in the program code sequence.
Unfortunately, the COMPARE instruction can take a long time to execute. Because of this, the execution of dependent, subsequent instructions, such as the ADD instruction, may be delayed until the COMPARE instruction completes execution. The present invention address this and other problems.